﻿/**
 * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.html or http://ckeditor.com/license
 */

CKEDITOR.editorConfig = function( config ) {
	
	// %REMOVE_START%
	// The configuration options below are needed when running CKEditor from source files.
	//config.plugins = 'dialogui,dialog,about,a11yhelp,dialogadvtab,basicstyles,bidi,blockquote,clipboard,button,panelbutton,panel,floatpanel,colorbutton,colordialog,templates,menu,contextmenu,div,resize,toolbar,elementspath,enterkey,entities,popup,filebrowser,find,fakeobjects,flash,floatingspace,listblock,richcombo,font,forms,format,horizontalrule,htmlwriter,iframe,wysiwygarea,image,indent,indentblock,indentlist,smiley,justify,menubutton,language,link,list,liststyle,magicline,maximize,newpage,pagebreak,pastetext,pastefromword,preview,print,removeformat,save,selectall,showblocks,showborders,sourcearea,specialchar,scayt,stylescombo,tab,table,tabletools,undo,wsc,texzilla,autocorrect,youtube,lineutils,widget,placeholder,eqneditor,confighelper,pbckcode,uploadcare';
	// Plugins removed: eqneditor
	config.plugins = 'dialogui,dialog,about,a11yhelp,dialogadvtab,basicstyles,bidi,blockquote,clipboard,button,panelbutton,panel,floatpanel,colorbutton,colordialog,templates,menu,contextmenu,div,resize,toolbar,elementspath,enterkey,entities,popup,filebrowser,find,fakeobjects,flash,floatingspace,listblock,richcombo,font,forms,format,horizontalrule,htmlwriter,iframe,wysiwygarea,image,indent,indentblock,indentlist,smiley,justify,menubutton,language,link,list,liststyle,magicline,maximize,newpage,pagebreak,pastetext,pastefromword,preview,print,removeformat,save,selectall,showblocks,showborders,sourcearea,specialchar,scayt,stylescombo,tab,table,tabletools,undo,wsc,texzilla,autocorrect,youtube,lineutils,widget,placeholder,confighelper,pbckcode,uploadcare';
	config.skin = 'moonocolor';
//	config.language = 'en';
//	
//	// Define changes to default configuration here. For example:
	config.uiColor = '#AADC6E';
//	
//	// Use ENTER_BR and ENTER_P to avoid that divs break the line
	config.enterMode = CKEDITOR.ENTER_BR;
	config.shiftEnterMode = CKEDITOR.ENTER_P;
//	
//	//activate the spell checker
//	config.disableNativeSpellChecker = false;
	config.entities_latin = false;
    config.entities_greek = false;
//	// %REMOVE_END%
//    
//    config.extraPlugins = 'pbckcode';
//    config.allowedContent = 'pre[*]{*}(*)';
//    config.pbckcode = {
//    		highlighter : 'HIGHLIGHT',
//    		modes : [
//    		         ['Java', 'java'],
//    		         ['HTML', 'html']
//    		]
//    };
//    
//
//    // Toolbar groups configuration.
//    config.toolbarGroups = null;
    
 // CKEDITOR TOOLBAR CUSTOMIZATION
    // I only set the needed buttons, so feel frey to add those you want in the array
    config.toolbarGroups = [
        { name: 'pbckcode' } ,
        // you other buttons here
    ];

    // CKEDITOR PLUGINS LOADING
    config.extraPlugins = 'pbckcode'; // add other plugins here (comma separated)

    // ADVANCED CONTENT FILTER (ACF)
    // ACF protects your CKEditor instance of adding unofficial tags
    // however it strips out the pre tag of pbckcode plugin
    // add this rule to enable it, useful when you want to re edit a post
    config.allowedContent= 'pre[*]{*}(*)'; // add other rules here


    // PBCKCODE CUSTOMIZATION
    config.pbckcode = {
        // An optional class to your pre tag.
        cls : '',

        // The syntax highlighter you will use in the output view
        highlighter : 'PRETTIFY',

        // An array of the available modes for you plugin.
        // The key corresponds to the string shown in the select tag.
        // The value correspond to the loaded file for ACE Editor.
        modes :  [ ['HTML', 'html'], ['CSS', 'css'], ['PHP', 'php'], ['JS', 'javascript'] ],

        // The theme of the ACE Editor of the plugin.
        theme : 'textmate',

        // Tab indentation (in spaces)
        tab_size : '4'
    };
    
};
